home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
0022-3.564
/
dmg-3417
/
gfa_prog.s
/
gfa_peak.lst
next >
Wrap
File List
|
1989-04-05
|
3KB
|
67 lines
ON ERROR GOSUB einde
ON BREAK GOSUB einde
INLINE music%,22000
' ! inline is for reserving some space to
' ! put the music in.
DIM reg%(16),ba$(16) ! dimension some space
level_bars ! make level bars
'
DO ! oke lets start...
FILESELECT "a:\music\*.thk","",fnam$! fileselector to choose music.
IF fnam$<>"" ! if name isn't nothing then
BLOAD fnam$,music% ! load music into reserved space
musix_on ! gosub routine to start music
bars ! goto level bars show...
~INP(2) ! wait for key press
musix_off ! stop music
ELSE ! if name is nothing then
musix_off ! stop music
END ! back to basic or if compiled desktop
ENDIF ! end
LOOP ! goto start again to do it all over again
PROCEDURE musix_on
do%=GEMDOS(&H20,L:0) ! supervisor mode
reg%(0)=1 ! choose music
RCALL music%,reg%() ! music call
SLPOKE &H4D2,music%+8 ! begin address music diskmagazine 2
' SLPOKE &H4D2,music%+4 ! begin address music diskmagazine 1
~GEMDOS(&H20,L:do%) ! user mode
RETURN
'
PROCEDURE musix_off
do%=GEMDOS(&H20,L:0) ! supervisor mode
SLPOKE &H4D2,0 ! stop music
WAVE 0,0,0,0 ! all sound off
~GEMDOS(&H20,L:do%) ! user mode kiezen
RETURN
'
PROCEDURE einde
musix_off
END
RETURN
'
PROCEDURE level_bars
CLS ! clear the screen
FOR t=0 TO 15 ! for_next loop
BOX 0,16,8,15-t ! draw a box in 16 different hights
GET 0,0,8,16,ba$(t) ! get the different hights
NEXT t ! draw next box
CLS ! clear screen again
RETURN
'
PROCEDURE bars
WHILE NOT INP?(2) ! if no key press then.. <---
PUT 0,30,ba$(XBIOS(28,0,8)) ! put volume bar channel 1 |
PUT 10,30,ba$(XBIOS(28,0,9)) ! put volume bar channel 2 |
PUT 20,30,ba$(XBIOS(28,0,10)) ! put volume bar channel 3 |
PUT 30,30,ba$((XBIOS(28,0,0) DIV 16))! put tone bar channel 1 |
PUT 40,30,ba$((XBIOS(28,0,2) DIV 16))! put tone bar channel 2 |
PUT 50,30,ba$((XBIOS(28,0,4) DIV 16))! put tone bar channel 3 |
' |
' The first 3 are volume bars, always from 0 to 15. |
' The last 3 are tone hights, from 0 to 255. We only got 16 level |
' bars so we DIV it by 16 and then it works with 16 level bars. |
' |
WEND ! and back to above -----
RETURN ! back to main loop...